Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix v0 ref resolution #7415

Merged
merged 4 commits into from
Apr 20, 2023
Merged

fix v0 ref resolution #7415

merged 4 commits into from
Apr 20, 2023

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Apr 20, 2023

resolves #7408

Description

Checklist

@cla-bot cla-bot bot added the cla:yes label Apr 20, 2023
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

models = [node for node in all_nodes if node.resource_type == NodeType.Model]

# test v1 model
parsed_node_patch_v1 = models[0].patch.call_args_list[0][0][0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not possible to test on the model nodes directly (e.g. models[0]) because these are MagicMock objects and parser.parse_file calls node.patch under the hood, which mocks the actual patching functionality. @gshank - We'd brought up moving the node.patch method to the PatchParser itself which would make the parsers more testable too - I'm working on opening a tech debt issue for it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, another good reason to do it.

@MichelleArk MichelleArk marked this pull request as ready for review April 20, 2023 15:58
@MichelleArk MichelleArk requested review from a team as code owners April 20, 2023 15:59
@MichelleArk MichelleArk requested review from QMalcolm, nathaniel-may and gshank and removed request for nathaniel-may April 20, 2023 15:59
@MichelleArk MichelleArk merged commit 1722079 into main Apr 20, 2023
@MichelleArk MichelleArk deleted the 7408/fix-v0 branch April 20, 2023 16:06
Comment on lines +341 to +342
# if version is None
# else f"{str(resource_type)}.{package}.{name}.v{version}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this PR is already merged, but did we mean to leave these commented?

If so, maybe we want to delete them altogether in a follow-up PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh no! I did mean to just rip those out. I'll clean it up in a follow-up PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-2436] [Bug] Version 0 makes itself the latest_version
3 participants